class CreateMugsOf < ActiveRecord::Migration
  def self.up
    create_table :mugs_of_schools do |t|
      t.column :photo_id, :integer
      t.column :school_id, :integer
      t.column :school_comment_id, :integer
      t.column :created_at, :datetime
    end
    
    create_table :mugs_of_events do |t|
      t.column :photo_id, :integer
      t.column :event_id, :integer
      t.column :event_comment_id, :integer
      t.column :created_at, :datetime
    end
    
    create_table :mugs_of_topics do |t|
      t.column :photo_id, :integer
      t.column :topic_id, :integer
      t.column :created_at, :datetime
    end
    
    create_table :mugs_of_students do |t|
      t.column :photo_id, :integer
      t.column :student_id, :integer
      t.column :created_at, :datetime
    end
  end

  def self.down
    drop_table :mugs_of_schools
    drop_table :mugs_of_events
    drop_table :mugs_of_topics
    drop_table :mugs_of_students
  end
end
